import axios from '@/utils/request'
export default {
  PurchaseItem: {
    list: {
      list_filter: {
        'store.id': () => {
          return axios
            .get(`/manage/stores`)
            .then(res =>
              Object.assign({ __label: '门店' },
                ...res.data.map(v => { return { [v.id]: v.name } })))
        }
      },
      list_display: [
        'purchase',
        'specification',
        'quantity',
        'primeCost',
        'retrieved',
        'comment'
      ]
    },
    form: {
      fields: [
        'purchase',
        'specification',
        'quantity',
        'primeCost',
        'retrieved',
        'comment'
      ]
    }
  }
}

